#parse('/user/head.html')

<div class="header">
	#if($message)
	<div id="messageBox" class="alert alert-error">
		<label id="loginError" class="error">$message</label>
	</div>
	#end
</div>
<h1 class="form-signin-heading icon-wink">$lang.get('user.login')</h1>
<form id="loginForm" class="form-signin" action="/user/login" method="post">
	<div class=''>
		<label class="input-label icon-user" for="username">$lang.get('user.name')</label>
		<input type="text" id="username" name="name" value="$!name" class="form-control" required />
	</div>
	<div class=''>
		<label class="input-label icon-lock" for="password">$lang.get('user.password')</label>
		<input type="password" id="password" name="pwd" value="$!pwd" class="form-control" required />
	</div>
	#if($global.getInt('user.captcha', 1) == 1)
	<div class="validateCode">
		<label class="input-label mid" for="validateCode">$lang.get('user.captcha')</label>
		<input type="text" id="validateCode" name="code" maxlength="4" required class="form-control">
		<img id="validateImg" src="" onclick="_oncaptcha();" class="mid validateCode" style="">
		<a href="javascript:" onclick="_oncaptcha();" class="validateCodeRefresh ">$lang.get('a.refresh')</a>
		<script>
			function _oncaptcha() {
				$.get('/captcha', {}, function(d) {
					if (d.state == 200) {
						$('#validateImg').attr('src', d.uri);
					}
				})
			}
			$(function(){
				_oncaptcha();
			})
		</script>
	</div>
	#end
	
	<button class="btn btn-large btn-primary btn-block" type="submit">$lang.get('btn.ok')</button>
	#if($module.getFile('/user/thirdlogin.html'))
	#parse('/user/thirdlogin.html')
	#end
	<div id="themeSwitch">
		<a class="icon-wondering" href="/user/forget">$lang.get('a.forget.user')</a>
		#if($global.getString('user.system', 'close')=='open')
		&nbsp;&nbsp;<a href="/user/register">$lang.get('a.register.user')</a>
		#end
	</div>
</form>
<div class="footer">
	$lang.get('copyright') - $lang.get('powerby') 
</div>

#parse('/user/foot.html')

